<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<title>后台控制面板--首页</title>
<link rel="stylesheet" type="text/css" href="/style/style.css" />
<link rel="stylesheet" type="text/css" href="/style/confirm.css" />

<script type="text/javascript" src="/js/jquery/lib/jquery-1.4.4.min.js"></script>
<link type="text/css" rel="stylesheet" href="/js/jquery/plugin/formValidator/style/validator_leo.css"/>
<script type="text/javascript" src="/js/jquery/plugin/formValidator/formValidator_leo.js" ></script>
<script type="text/javascript" src="/js/jquery/plugin/formValidator/formValidatorRegex.js" ></script>
<script type="text/javascript" src="/js/jquery/ui/jquery-ui-1.8.10.custom.js"></script>
<script type="text/javascript" src="/js/jquery/ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<link type="text/css" href="/js/jquery/themes/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery/lib/jquery.cookie.js"></script>
<script type="text/javascript" src="/js/jquery/lib/jquery.hotkeys.js"></script>

<style type="text/css">
<!--
.editor_close, .editor_close_mover {position:absolute;right:-30px;top:-2px;margin:7px 7px 0 0;*margin:7px 4px 0 0;cursor:pointer;border:1px solid #a7190f;}
.editor_close {background:#dc4835;}
.editor_close img,  .editor_close_mover img, .editor_min img, .editor_min_mover img{display:block;}
.editor_close_mover {background:#ea7759;}
.editor_dialog_title {padding:9px 0 7px 10px;text-align:left;font:bold 12px "lucida Grande",Verdana;color:white;}
.editor_dialog_content {background:#fff;text-align:center;margin:0;padding:0;filter:none;}

//-->
</style>
<script> 
function test(obj) {
    if (obj.id == "Radio1") {
        document.getElementById("Div1").style.display = "block";
        document.getElementById("Div2").style.display = "none";
		document.getElementById("Div3").style.display = "none";
		document.getElementById("Div4").style.display = "none";
    }
     if (obj.id == "Radio2"){
        document.getElementById("Div1").style.display = "none";
        document.getElementById("Div2").style.display = "block";
		document.getElementById("Div3").style.display = "none";
		document.getElementById("Div4").style.display = "none";
    }
	if (obj.id == "Radio3") {
        document.getElementById("Div1").style.display = "none";
        document.getElementById("Div2").style.display = "none";
		document.getElementById("Div3").style.display = "block";
		document.getElementById("Div4").style.display = "none";
    }
     if (obj.id == "Radio4"){
        document.getElementById("Div1").style.display = "none";
        document.getElementById("Div2").style.display = "none";
		document.getElementById("Div3").style.display = "none";
		document.getElementById("Div4").style.display = "block";
    }

        }
		
		
 $(function () {
            $("#selectAll").click(function () {//全选
                $("#Div1 :checkbox").attr("checked", true);
            });

            $("#unSelect").click(function () {//全不选
                $("#Div1 :checkbox").attr("checked", false);
            });

            $("#reverse").click(function () {//反选
                $("#Div1 :checkbox").each(function () {
                    $(this).attr("checked", !$(this).attr("checked"));
                });
            });
			
			 $("#selectAll1").click(function () {//全选
                $("#Div2 :checkbox").attr("checked", true);
            });

            $("#unSelect1").click(function () {//全不选
                $("#Div2 :checkbox").attr("checked", false);
            });

            $("#reverse1").click(function () {//反选
                $("#Div2 :checkbox").each(function () {
                    $(this).attr("checked", !$(this).attr("checked"));
                });
            });
			
			
			 $("#selectAll2").click(function () {//全选
                $("#Div3 :checkbox").attr("checked", true);
            });

            $("#unSelect2").click(function () {//全不选
                $("#Div3 :checkbox").attr("checked", false);
            });

            $("#reverse2").click(function () {//反选
                $("#Div3 :checkbox").each(function () {
                    $(this).attr("checked", !$(this).attr("checked"));
                });
            });
			
			
			 $("#selectAll3").click(function () {//全选
                $("#Div4 :checkbox").attr("checked", true);
            });

            $("#unSelect3").click(function () {//全不选
                $("#Div4 :checkbox").attr("checked", false);
            });

            $("#reverse3").click(function () {//反选
                $("#Div4 :checkbox").each(function () {
                    $(this).attr("checked", !$(this).attr("checked"));
                });
            });
			
        });
</script>

<script type="text/javascript">

$(document).ready(function(){
	  	
	$.formValidator.initConfig({
			formid:"official_doc_edit_form",
			autotip: true,
			onerror:function(msg){
				return false;
			},
			onsuccess:function(){
				return true;
			}
	});
 	$("#doc_no").formValidator({onshow:"请填写公文文号",onfocus:"请填写公文文号，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请填写公文文号，必填项"});
 	//$("#doc_type").formValidator({onshow:"请选择文件类别",onfocus:"请选择文件类别，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请选择文件类别，必填项"});
 	//$("#send_time").formValidator({onshow:"请填写发送时间",onfocus:"请填写发送时间，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请填写发送时间，必填项"});
	//$("#emergency_level").formValidator({onshow:"请选择缓急程度",onfocus:"请选择缓急程度，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请选择缓急程度，必填项"});
	//$("#confidential_level").formValidator({onshow:"请选择密级",onfocus:"请选择密级，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请选择密级，必填项"});
	//$("#template_id").formValidator({onshow:"请选择头文件",onfocus:"请选择头文件，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请选择文件，必填项"});
	$("#txtTit").formValidator({onshow:"请填写公文标题",onfocus:"请填写公文标题，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请填写公文标题，必填项"});
	//$("#content").formValidator({onshow:"请填写正文内容",onfocus:"请填写正文内容，必填项",oncorrect:"谢谢您的合作"}).inputValidator({min:1,onerror:"请填写正文内容，必填项"});

	//提示信息
	 var msgInfo = '${msgInfo?default("")}';
	if(msgInfo != '' && msgInfo != null){
		alert(msgInfo);
	}

});
function save(){
	
	if($("#accepter").val()=="")
	{
		alert("请选择下发单位！");
		return;
	}
	
	if(!checkAttach())return;
	
 	$("#official_doc_edit_form").attr("action", "officialDoc_save.action")
	document.official_doc_edit_form.submit();  
}
function checkAttach(){
	var rtn = true;
	//校验附件
	$("input[name='officialDocPojo.attach_title']").each(function(idx){
		if($(this).val() != '' && $("input[name='officialDocPojo.attach']:eq("+idx+")").val() == ''){//填了标题必须选择附件
			alert("请选择要上传的附件！");
			$("input[name='officialDocPojo.attach']:eq("+idx+")").focus();
			rtn = false;
			return;
		}
	});
	return rtn;
}

function send(){
	
	if(!checkAttach())return;
	
	if($("#accepter").val()=="")
	{
		alert("请选择下发单位！");
		return;
	}
	$("#official_doc_edit_form").attr("action", "officialDoc_send.action");
	$("#official_doc_edit_form").submit();
}
function addAttach(divId, fileName){
	var divAttach = document.getElementById(divId);
	var myDiv = document.createElement("div");
	myDiv.style.marginBottom = "5px";
	myDiv.innerHTML = "&nbsp;附件说明：<input type=\"text\" size=\"55\" name=\"officialDocPojo.attach_title\" />&nbsp;<input type=\"file\" name=\""+fileName+"\">";
	myDiv.innerHTML += "<input type=\"button\" onclick=\"delAttach('"+divId+"', this)\" value=\"删除\" />";
	divAttach.appendChild(myDiv);
}

function delAttach(divId, curObj){
	$(curObj).parent().remove();
}

function delFile(fileId, fileName, curObj){
	if(window.confirm("您确定要删除["+fileName+"]吗？")){
		$.get("officialDocDelAttach.action?docAttachId=" + fileId,function(data){
			if(data.ajaxMsg && data.ajaxMsg != ''){
				alert(data.ajaxMsg);
				if(data.ajaxMsg == "删除成功！"){
					$(curObj).parent().parent().parent().remove();
				}
			}
		});
	}
}

function editWord(){
	if($("#docid").val()=="" || $("#docid").val()==0){
		alert("请先保存公文!");
		return;
	}
	if($("#template_id").val() == ""){alert("请先选择头文件");return;}
	var iWidth = 1024;                          //弹出窗口的宽度;
	var iHeight = 768;                        //弹出窗口的高度;
	var iTop = (window.screen.availHeight-30-iHeight)/2;       //获得窗口的垂直位置;
	var iLeft = (window.screen.availWidth-10-iWidth)/2;           //获得窗口的水平位置;
	window.open("official_doc_publisheditword.jsp?docid="+$("#docid").val()+"&template_id="+$("#template_id").val(), '', 'height='+iHeight+', width='+iWidth+', top='+iTop+', left='+iLeft+', toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');
}

</script>
</head>
<body class="indexbody">
	<div id="Content">
		<div style="width: 100%;">
			<div urlvalue="Oasp2803" functionid="FUNC00004" urlname="公告"
				recordcount="5" minflg="0" class="DesktopBlock" id="FUNC00004">
				<div id="Block">
					<div id="BlockHead">
						<table border="0" cellspacing="0" cellpadding="0" height="100%"
							width="100%">
							<tbody>
								<tr valign="center">
									<td width="5"></td>
									<td>发文管理</td>
									<td width="22"></td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="right_con">
						<ul class="rig_nav">
							<li class="rig_nav_on"><a href="officialDoc_goPublish.action">发文拟稿</a>
							</li>
							<li><a href="officialDoc_goPublishList.action">发文列表</a>
							</li>
						</ul>
						<!-- <ul class="rig_nav2">
                    	<li class="rig_nav_on2"><a href="chuangjianzhengwen.html">创建正文</a></li>
                        <li><a href="fawendengjibiao.html">发文登记表</a></li>
                        <li><a href="chuangjianbanli.html">创建办理</a></li>
                    </ul> -->
					</div>
					<form method="post" action="" id="official_doc_edit_form" name="official_doc_edit_form" enctype="multipart/form-data">
					<input type="hidden" id="receive_section" name="officialDocPojo.receive_section" />
					<input type="hidden" id="docid" name="officialDoc.id" value="${officialDocPojo.id?default('')}" />
					<input type="hidden" id="docid" name="officialDocPojo.id" value="${officialDocPojo.id?default('')}" />
					<div id="BlockDetail">
						<table border="0" cellpadding="1" cellspacing="1" width="100%"
							bgcolor="#f9f9f9">
							<tbody>

								<tr>
									<td class="STYLE10" align="center" bgcolor="#FFFFFF"
										height="30">
										<div class=main id=main0>
											<ul class=block>
												<li>
													<div id=formtop>
														<table border="0" cellpadding="1" cellspacing="1"
															width="100%" bgcolor="#dddedb">
															<tbody>
																<tr height=26 width="100%">
																	<td class=STYLE109 align=right width="12%"
																		bgColor=#ffffff height=15><span
																		class="STYLE2 STYLE3"><span class="h2-red">*</span>公文文号：</span>
																	</td>
																	<td align=left width="20%" bgColor=#ffffff height=15>
																		<input name="officialDocPojo.doc_no" id="doc_no" value="${officialDocPojo.doc_no?default('')}">
																	</td>
																
																	
																	</td>
																</tr>
																<tr height=26 width="100%">
																	<td class=STYLE109 align=right width="12%"
																		bgColor=#f6f6f6 height=15><span
																		class="STYLE2 STYLE3">公文所属：</span>
																	</td>
																	<td class=STYLE109 align=left width="20%"
																		bgColor=#f6f6f6 height=15>
																		<input name="officialDocPojo.belong_section" id="belong_section" value="${officialDocPojo.belong_section?default('')}">
																	</td>
																	<td align=right width="10%" bgColor=#f6f6f6 height=30><span
																		class=STYLE109>缓急程度：</span>
																	</td>
																	<td class=STYLE109 align=left bgColor=#f6f6f6><SELECT
																		name="officialDocPojo.emergency_level" id="emergency_level" selval="${officialDocPojo.emergency_level?default('')}">
																			<OPTION value="">请选择缓急程度</OPTION>
																			<#if paramMap.param1002?exists> 
																			<#list paramMap.param1002 as item>
																				<OPTION value="${item.paramCode}">${item.paramName}</OPTION>
																			</#list>
																			</#if>
																	</SELECT>
																	<!--</td>
																
															
																		<input type="button" onclick="editWord();" value="编辑文件" />
																	</td>
																--></tr>
																<!--<tr height=26 width="100%">
																	<td class=STYLE109 align=right width="12%"
																		bgColor=#ffffff height=15><span
																		class="STYLE2 STYLE3">头文件：</span>
																	</td>
																	<td class=STYLE109 align=left width="20%" bgColor=#ffffff height=15>
																		<SELECT name="officialDocPojo.template_id" id="template_id" selval="${officialDocPojo.template_id?default('')}">
																			<OPTION value="">请选择头文件</OPTION>
																			<#if docTemplateList?exists> 
																			<#list docTemplateList as templatelist>
																				<OPTION value="${templatelist.id}">${templatelist.title}</OPTION>
																			</#list>
																			</#if>
																		</SELECT>&nbsp;
																		<input type="button" onclick="editWord();" value="编辑文件" />
																	</td>
 																	<td align=right width="10%" bgColor=#ffffff height=30><span
																		class=STYLE109>印章签名：</span>
																	</td>
																	<td class=STYLE109 align=left bgColor=#ffffff>
																		<SELECT name="officialDocPojo.seal_id" id="seal_id" selval="${officialDocPojo.seal_id?default('')}">
																			<OPTION value="">请选择印章签名</OPTION>
																			<#if sealSignatureList?exists> 
																			<#list sealSignatureList as seallist>
																				<OPTION value="${seallist.id}">${seallist.title}</OPTION>
																			</#list>
																			</#if>
																		</SELECT>
																	</td> 
																	<td align=right bgColor=#ffffff><span
																		class=STYLE109>&nbsp;</span>
																	</td>
																	<td class=STYLE109 align=left bgColor=#ffffff>
																		&nbsp;
																	</td>
																</tr>
																--><tr height=26 width="100%">
																	<td align=right width="12%" bgColor=#f6f6f6 height=30><span
																		class="STYLE2 STYLE3"><span class="h2-red">*</span>公文标题：</span>
																	</td>
																	<td align=left bgColor=#f6f6f6 colspan=5 height=30><input
																		size="85" name="officialDocPojo.title" id="txtTit" value="${officialDocPojo.title?default('')}">
																	</td>
																</tr>
																<tr>
																	<td vAlign=center align=right bgColor=#ffffff><span
																		class=STYLE109>正文内容： </span>
																	</td>
																	<td class=STYLE109 align=left bgColor=#ffffff colspan=5
																		height=20><TEXTAREA style=""
																			name="officialDocPojo.content" id="content" rows=10 cols=100>${officialDocPojo.content?default('')}</TEXTAREA></td>
																</tr>
																<tr>
																	<td vAlign=center bgColor=#f6f6f6 align=right><span
																		class="STYLE2 STYLE3">主题词：</span>
																	</td>
																	<td class="STYLE109 STYLE2 STYLE2" bgColor=#f6f6f6
																		align=left colspan=5 height=40>
																			<input size="85" name="officialDocPojo.key_word" id="title" value="${officialDocPojo.key_word?default('')}" /></td>
																</tr>
																<tr>
																	<td vAlign=center bgColor=#ffffff align=right><span
																		class="STYLE2 STYLE3"><span class="h2-red">*</span>下发单位：</span>
																	</td>
																	<td class="STYLE109 STYLE2 STYLE2" align=left colspan=5 height=40 id='confirm-dialog'>
																	<#if officialDoc?exists>
																	  <input id="accepter"  readonly="readonly" href=name='confim'  class='confirm'  size=15 name="receive_section" value="${officialDoc.receive_section?default('')}"/>
																	  <#else>
																	  <input id="accepter"  readonly="readonly" href=name='confim'  class='confirm'  size=15 name="receive_section" value=""/>
																	  </#if>
																	</td>
																</tr>
																<tr>
																	<td vAlign=center bgColor=#f6f6f6 align=right><span
																		class="STYLE2 STYLE3">附件：</span>
																	</td>
																	<td class="STYLE109 STYLE2 STYLE2" bgColor=#f6f6f6 align=left colspan=5 height=40>
																		<div id="divAttach">
																			<div style="clear:both;margin-bottom:5px;">
																				&nbsp;附件说明：<input type="text" size="55" name="officialDocPojo.attach_title" />&nbsp;<input type="file" name="officialDocPojo.attach" /><input type="button" onclick="addAttach('divAttach', 'officialDocPojo.attach')" value="增加附件" />
																			</div>
																		</div>
																		<#if officialDocPojo.docAttachList?exists>
																			<#list officialDocPojo.docAttachList as attachlist>
																				<div style="clear:both;">
																					<div style="float:left;margin-top:5px;position: relative;">
																						&nbsp;附件说明：${attachlist.attach_title}&nbsp;&nbsp;<a target="_blank" href="${attachlist.attach_path}">${attachlist.attach_old_name }</a>
																						<div class="editor_close" style="margin-top:5px;"><img style="margin:0;" width="12" height="12" onclick="delFile(${attachlist.id}, '${attachlist.attach_old_name }', this)" src="/images/ico_closetip.gif" title="删除" /></div>
																					</div>
																				</div>
																			</#list>
																		</#if>
																	</td>
																</tr>
																<tr>
																	<td class=STYLE3 bgColor=#ffffff align=center colSpan=6 height=30>
																		<div style="height: 30px;width:210px;margin:5px auto 5px;">
																				<div style="float:left;margin-right:10px;"><span class="xp-b-leftSubmit2">
																				</span> <a id="uw_flight_submit_lnk" class="xp-b-submit2"
																					style="line-height: 30px;" href="javascript:send();"><span style="color:red;">下发</span></a>
																					<span class="xp-b-rightSubmit2">
																				</span>
																				</div>
																				<!--<div style="float:left;margin-right:10px;"><span class="xp-b-leftSubmit2">
																				</span> <a id="uw_flight_submit_lnk" class="xp-b-submit2"
																					style="line-height: 30px;" href="javascript:save();">暂存</a>
																					<span class="xp-b-rightSubmit2">
																				</span>
																				</div>
																				--><div style="float:left;margin-right:10px;">
																				<span class="xp-b-leftSubmit2">
																				</span> <a id="uw_flight_submit_lnk" class="xp-b-submit2"
																					style="line-height: 30px;" href="javascript:document.forms[0].reset();">重置</a>
																					<span class="xp-b-rightSubmit2">
																				</span>
																				</div>
																		</div></td>
																</tr>
															</tbody>
														</table>
													</div>
												</li>
											</ul>
										</div></td>

								</tr>
							</tbody>
						</table>
					</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	</div>
	</div>
<script type="text/javascript">
<!--
$(document).ready(function(){
	//初始化下拉框的值
	$("#doc_type").val($("#doc_type").attr("selval"));
	$("#emergency_level").val($("#emergency_level").attr("selval"));
	$("#confidential_level").val($("#confidential_level").attr("selval"));
	$("#template_id").val($("#template_id").attr("selval"));
	//$("#seal_id").val($("#seal_id").attr("selval"));
});
//-->
</script>
<div id='confirm'>
	<div class='header'><span>选择单位</span></div>
            <!--内容开始-->
 <form action="" name="" id="acsd" method="">
  <div class="right_con">
    <ul>
      <li>
        <label class="xp-b-left xp-w-label-lob">
          <input  onClick="test(this)"  name="srch" type="radio" style="vertical-align:middle; _margin-top:-4px;" class="wizardRadio xp-b-left" checked="checked" id="Radio1"  wizardType="Hotel"/>
          &nbsp;市工会</label>
      </li>
      <li>
        <label  class="xp-b-left xp-w-label-lob">
          <input onClick="test(this)" id="Radio2" style="vertical-align:middle; _margin-top:-4px;" class="wizardRadio xp-b-left" wizardType="taocan" type="radio"  name="srch"/>
          &nbsp;区工会</label>
      </li>
      <li>
        <label class="xp-b-left xp-w-label-lob">
          <input  onClick="test(this)"  name="srch" type="radio" style="vertical-align:middle; _margin-top:-4px;" class="wizardRadio xp-b-left"  id="Radio3"  wizardType="Hotel"/>
          &nbsp;街道工会</label>
      </li>
      <li>
        <label  class="xp-b-left xp-w-label-lob">
          <input onClick="test(this)" id="Radio4" style="vertical-align:middle; _margin-top:-4px;" class="wizardRadio xp-b-left" wizardType="taocan" type="radio"  name="srch"/>
          &nbsp;基层工</label>
      </li>
    </ul>
    <div class="clear"></div>
  </div>
  <div class="sd-box">
   <#if grade?exists>
<#if grade=1>
   <div  id="Div1">
     <div id="playList" style=" margin-bottom:5px;">
      
      </div>
      <input type="button" value="全选" id="selectAll" />
    <input type="button" value="全不选" id="unSelect" />
    <input type="button" value="反选" id="reverse" />
    </div>
    
    <div  id="Div2"  style="display:none">
      <div id="playList1" style=" margin-bottom:5px;">
      <#list forglist?if_exists as flist>
   
       <input type="checkbox" name="unionName" value="${flist.organization_id?default('')}" />${flist.organization_name?default('')}<br />
       </#list>
  
      </div>
      <input type="button" value="全选" id="selectAll1" />
    <input type="button" value="全不选" id="unSelect1" />
    <input type="button" value="反选" id="reverse1" />
    </div>
    
   
    <div  id="Div3" style="display:none">
      <div id="playList2" style=" margin-bottom:5px;">
      <#list forglist?if_exists as flist>
      <#if flist.childOrgList?exists>
     <#list flist.childOrgList as fc1list>
   
       <input type="checkbox" name="unionName" value="${fc1list.organization_id?default('')}" />${fc1list.organization_name?default('')}<br />
    
        </#list>
        </#if>
         </#list>
        
      </div>
      <input type="button" value="全选" id="selectAll2" />
    <input type="button" value="全不选" id="unSelect2" />
    <input type="button" value="反选" id="reverse2" />
    </div>
   
    <div  id="Div4" style="display:none">
     <div id="playList3" style=" margin-bottom:5px;">
     <#list forglist?if_exists as flist>
      <#if flist.childOrgList?exists>
     <#list flist.childOrgList as fc1list>
     <#if fc1list.childOrgList?exists>
     <#list fc1list.childOrgList as fc2list> 
       <input type="checkbox" name="unionName" value="${fc2list.organization_id?default('')}" />${fc2list.organization_name?default('')}<br />
       </#list>
        </#if>
         </#list>
         </#if>
         </#list> 
      </div>
      <input type="button" value="全选" id="selectAll3" />
    <input type="button" value="全不选" id="unSelect3" />
    <input type="button" value="反选" id="reverse3" />
    </div>
    </#if>
</#if>





<#if grade?exists>
<#if grade=2>
   <div  id="Div1">
     <div id="playList" style=" margin-bottom:5px;">
      <#list threelist?if_exists as tlist>
       <input type="checkbox" name="unionName" value="${tlist.organization_id?default('')}" />${tlist.organization_name?default('')}<br />
       </#list>
      </div>
      <input type="button" value="全选" id="selectAll" />
    <input type="button" value="全不选" id="unSelect" />
    <input type="button" value="反选" id="reverse" />
    </div>
    
    <div  id="Div2"  style="display:none">
      <div id="playList1" style=" margin-bottom:5px;">
      
      </div>
      <input type="button" value="全选" id="selectAll1" />
    <input type="button" value="全不选" id="unSelect1" />
    <input type="button" value="反选" id="reverse1" />
    </div>
    
   
    <div  id="Div3" style="display:none">
      <div id="playList2" style=" margin-bottom:5px;">
      <#list forglist?if_exists as flist>
       <input type="checkbox" name="unionName" value="${flist.organization_id?default('')}" />${flist.organization_name?default('')}<br />
       </#list>
      </div>
      <input type="button" value="全选" id="selectAll2" />
    <input type="button" value="全不选" id="unSelect2" />
    <input type="button" value="反选" id="reverse2" />
    </div>
   
    <div  id="Div4" style="display:none">
     <div id="playList3" style=" margin-bottom:5px;">
    
     <#list forglist?if_exists as flist>
      <#if flist.childOrgList?exists>
     <#list flist.childOrgList as fc1list> 
   		<input type="checkbox" name="unionName" value="${fc1list.organization_id?default('')}" />${fc1list.organization_name?default('')}<br />
       </#list>
        </#if>
         </#list>
      </div>
      <input type="button" value="全选" id="selectAll3" />
    <input type="button" value="全不选" id="unSelect3" />
    <input type="button" value="反选" id="reverse3" />
    </div>
    </#if>
</#if>

<#if grade?exists>
<#if grade=3>
   <div  id="Div1">
     <div id="playList" style=" margin-bottom:5px;">
      
      <#list threelist?if_exists as tlist>
       <input type="checkbox" name="unionName" value="${tlist.organization_id?default('')}" />${tlist.organization_name?default('')}<br />
       </#list>
      </div>
      <input type="button" value="全选" id="selectAll" />
    <input type="button" value="全不选" id="unSelect" />
    <input type="button" value="反选" id="reverse" />
    </div>
    
    <div  id="Div2"  style="display:none">
      <div id="playList1" style=" margin-bottom:5px;">
       <#list threelist?if_exists as tlist>
   		<input type="checkbox" name="unionName" value="${tlist.organization_id?default('')}" />${tlist.organization_name?default('')}<br />
       
         </#list>
      </div>
      <input type="button" value="全选" id="selectAll1" />
    <input type="button" value="全不选" id="unSelect1" />
    <input type="button" value="反选" id="reverse1" />
    </div>
    
   
    <div  id="Div3" style="display:none">
      <div id="playList2" style=" margin-bottom:5px;">

      </div>
      <input type="button" value="全选" id="selectAll2" />
    <input type="button" value="全不选" id="unSelect2" />
    <input type="button" value="反选" id="reverse2" />
    </div>
    <div  id="Div4" style="display:none">
     <div id="playList3" style=" margin-bottom:5px;">
    <#list forglist?if_exists as flist>
       <input type="checkbox" name="unionName" value="${flist.organization_id?default('')}" />${flist.organization_name?default('')}<br />
     
       </#list>
      </div>
      <input type="button" value="全选" id="selectAll3" />
    <input type="button" value="全不选" id="unSelect3" />
    <input type="button" value="反选" id="reverse3" />
    </div>
    </#if>
</#if>

<#if grade?exists>
<#if grade=4>
   <div  id="Div1">
     <div id="playList" style=" margin-bottom:5px;">
     
       <#list threelist?if_exists as tlist>
      <#if tlist.childOrgList?exists>
     <#list tlist.childOrgList as tc1list> 
      <#if tc1list.childOrgList?exists>
   <#list tc1list.childOrgList as tc2list>
   
   
       <input type="checkbox" name="unionName" value="${tc2list.organization_id?default('')}" />${tc2list.organization_name?default('')}<br />
       </#list>
        </#if>
         </#list>
         </#if>
       </#list>
      </div>
      <input type="button" value="全选" id="selectAll" />
    <input type="button" value="全不选" id="unSelect" />
    <input type="button" value="反选" id="reverse" />
    </div>
    
    <div  id="Div2"  style="display:none">
      <div id="playList1" style=" margin-bottom:5px;">
      <#list threelist?if_exists as tlist>
   <!--     <#if tlist.childOrgList?exists>
     <#list tlist.childOrgList as tc1list> 
   		<input type="checkbox" name="unionName" value="${tc1list.organization_id?default('')}" />${tc1list.organization_name?default('')}<br />
       </#list>
        </#if>
    -->    
    	<input type="checkbox" name="unionName" value="${tlist.organization_id?default('')}" />${tlist.organization_name?default('')}<br />
         </#list>
      </div>
      <input type="button" value="全选" id="selectAll1" />
    <input type="button" value="全不选" id="unSelect1" />
    <input type="button" value="反选" id="reverse1" />
    </div>
    
   
    <div  id="Div3" style="display:none">
      <div id="playList2" style=" margin-bottom:5px;">
    
      </div>
      <input type="button" value="全选" id="selectAll2" />
    <input type="button" value="全不选" id="unSelect2" />
    <input type="button" value="反选" id="reverse2" />
    </div>
   
    <div  id="Div4" style="display:none">
     <div id="playList3" style=" margin-bottom:5px;">
	   <#list forglist?if_exists as flist> 
       <input type="checkbox" name="unionName" value="${flist.organization_id?default('')}" />${flist.organization_name?default('')}<br />
         </#list>
      </div>
      <input type="button" value="全选" id="selectAll3" />
    <input type="button" value="全不选" id="unSelect3" />
    <input type="button" value="反选" id="reverse3" />
    </div>
    </#if>
</#if>

    <div style="margin-left:140px; margin-top:10px;">
      <!-- 按钮  -->
      <span><span >
      <!-- -->
      </span> 
      <!--<a id="uw_flight_submit_lnk" class="xp-b-submit2" style=" line-height:30px;" href="#" onclick="Toparent()">保存</a> -->
      <input type="button" name="button" value="保存"  onclick="Toparent();"/>
      <span >
      <!-- -->
      </span></span> </div>
  </div>
  </form>
</div>
<script language="javascript">
 //把添加的人员回传给父级页面，窗口关闭前触发
function  Toparent()
{  
	var form=new Array();
	var form = document.getElementsByName('unionName');
	var s =new Array();
	for(i=0;i<form.length;i++){ 
	    if (form[i].checked==true)
	    {
	       s.push(form[i].value); 
		} 
	}

	 $('#accepter').val(s.toString());

	$("#confirm").hide();
    $.modal.close();

	
}
</script>

<script type='text/javascript' src='/js/jquery.simplemodal.js'></script>
<script type='text/javascript' src='/js/confirm.js'></script>

</body>
</html>

